package main

import (
	"fmt"
	"strconv"
)

func main() {
	str := "10000"
	fmt.Printf("%T %#v\n", str, str)

	// 字符串转 int64
	i, _ := strconv.ParseInt(str, 10, 64)
	fmt.Printf("%T %#v\n", i, i)

	// int 转 字符串
	str = strconv.Itoa(int(i))
	fmt.Printf("%T %#v\n", str, str)

	// 字符串转 bool
	str = "true"
	b, _ := strconv.ParseBool(str)
	fmt.Printf("%T %#v\n", b, b)
}
